<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>商品列表</title>
    <style>
        table {
            border-collapse: collapse;
            width: 40%;
        }
        th, td {
            border: 1px solid black; /* 添加黑色实线 */
            padding: 8px;
            text-align: left;
        }
        th {
            background-color: #f2f2f2; /* 为表头添加背景色 */
        }
    </style>
</head>
<body>
<table>
    <caption style="color: #00f; font-size: 26px">商品列表</caption>
    <thead>
    <tr>
        <th>编号</th>
        <th>名称</th>
        <th>单价</th>
        <th>数量</th>
        <th>型号</th>
        <th>销售电话</th>
    </tr>
    </thead>
    <tbody>
    {% for item in data %}
        <tr>
            <td>{{ item.id }}</td>
            <td>{{ item.name }}</td>
            <td>{{ item.price }}</td>
            <td>{{ item.nums }}</td>
            <td>{{ item.model }}</td>
            <td>{{ item.phone }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>
</body>
</html>
